-
Notifications
You must be signed in to change notification settings - Fork 254
print lint location and message in plain bold instead of white #1092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| case boldYellow = "1;33" | ||
| case boldMagenta = "1;35" | ||
| case boldWhite = "1;37" | ||
| case boldGray = "1;90" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we actually have any right now, but presumably boldGray has similar issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like boldGray is used for note-level emissions, which are used by a handful of rules for notes attached to their primary warning. I ran a quick test on my active theme and one of the built-in themes in the macOS Terminal, and it does seem pretty low-contrast in both versions 😅
I wonder if we can downgrade that to just bold if we also take @allevato's suggestion of printing the location in plain (non-bold) text... 🤔
allevato
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Co-authored-by: Tony Allevato <tony.allevato@gmail.com>
This aligns the color of warning labels with the Swift compiler by making them yellow instead of magenta. Diagnostic categories were changed to make them not share a color with the warning labels.
|
@allevato If the current version is fine with you (i updated the screenshot in the PR description) then can you go ahead and merge it? I don't have access to the button here. 😅 |
|
I thought I didn't have the ability to override the failing Windows check but it looks like that changed? Merged, thanks for the fix! |
I've marked it as not required until I look into it further/remove it entirely 😅 (it's still the docc issue, but is presumably a SwiftPM bug given it works in 6.0+) |


fixes #1087
When colorized lint diagnostics were introduced, the source-location and message were printed in ANSI bold white, which caused an issue when using swift-format in a light-mode terminal theme. This PR changes the behavior to instead print these components in bold plain-color text, allowing them to inherit their color from the active terminal theme.
Using the same example i screenshotted in the above-linked issue, this is what the output looks like now: